﻿CREATE TABLE [dbo].[tblOrderSource]
(
	OrderSourceID int not null primary key identity(1,1),
	OwnerID int not null,
	Description nvarchar(50) not null,
	Active bit not null default 1,
	ProcessorCode char(1) null
)
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Defines an order source or campaign.', @level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOrderSource';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'primary key.  Uniquely identifies each Order Source.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOrderSource',
	@level2type = N'COLUMN', @level2name = N'OrderSourceID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'primary key.  Uniquely identifies each Order Source.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOrderSource',
	@level2type = N'COLUMN', @level2name = N'OwnerID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'User friendly description of the order source.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOrderSource',
	@level2type = N'COLUMN', @level2name = N'Description';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'If a source is not marked as active then it will not be displayed or accepted.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOrderSource',
	@level2type = N'COLUMN', @level2name = N'Active';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'If there is a specific payment processor associated this source.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOrderSource',
	@level2type = N'COLUMN', @level2name = N'ProcessorCode';
GO;
